s = raw_input()
n = int(s)
print n + 2
print n % 7
